#include "wdt.h"
#include "uart0.h"

void delay_ms(unsigned int ms)
{
	unsigned int i,j;
	for(i = 0; i < ms; i++)
		for(j = 0; j < 1800; j++);
}


int main()
{
	// 调用硬件初始化的函数
    hal_wdt_init();
    hal_uart0_init();
    int feed_time = 0;

	while(1)
	{
        if (feed_time < 3) 
        {
            uart_send_string("feed dog.");
            uart_send_char('\n');
            uart_send_char('\r');
            WDT.WTCNT |= 9375;
            feed_time++;
        }
        delay_ms(1050);
	}
	return 0;
}
